<%--
  Created by IntelliJ IDEA.
  Author: WaveHi
  Contact: HJBWaveHi@163.com
  Date: 18/9/2021
  Time: 下午 2:08
  Description: 
  Version: 1.0
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>HumanManage</title>
</head>
<body>
    <div class="function-add">
        <form action="humanServlet?action=add" method="post">
            <input type="text" name="name" placeholder="name" value="${requestScope.name}"/>
            <input type="text" name="age" placeholder="age" value="${requestScope.age}"/>
            <input type="submit" value="add"/>
        </form>
    </div>
    <table>
        <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>年龄</th>
        </tr>
        <c:forEach items="${sessionScope.humans}" var="human" varStatus="status">
        <tr>
            <td>${status.count}</td>
            <td>${human.name}</td>
            <td>${human.age}</td>
        </tr>
        </c:forEach>
    </table>
</body>
</html>
